unit TGuild_API;

interface

uses Classes, HashTable, EngineType, ObjBase, Guild, M2Share;

function TGuild_sGuildName(SelfObject: TGuild): _LPTSHORTSTRING; stdcall;
function TGuild_NoticeList(SelfObject: TGuild): TStringList; stdcall;
function TGuild_m_GuildWarList(SelfObject: TGuild): TCnHashTableSmall; stdcall;
function TGuild_m_GuildAllList(SelfObject: TGuild): TCnHashTableSmall; stdcall;
function TGuild_m_RankList(SelfObject: TGuild): TList; stdcall;
function TGuild_m_nContestPoint(SelfObject: TGuild): pInteger; stdcall;
function TGuild_boTeamFight(SelfObject: TGuild): pBoolean; stdcall;
function TGuild_TeamFightDeadList(SelfObject: TGuild): TStringList; stdcall;
function TGuild_m_boEnableAuthAlly(SelfObject: TGuild): pBoolean; stdcall;
function TGuild_dwSaveTick(SelfObject: TGuild): pLongWord; stdcall;
function TGuild_boChanged(SelfObject: TGuild): pBoolean; stdcall;
function TGuild_m_DynamicVarList(SelfObject: TGuild): TList; stdcall;
function TGuild_m_Territory(SelfObject: TGuild): TObject; stdcall;


//function

procedure TGuild_SaveGuildInfoFile(SelfObject: TGuild); stdcall;
function TGuild_LoadGuild(SelfObject: TGuild): Boolean; stdcall;
function TGuild_LoadGuildFile(SelfObject: TGuild; sGuildFileName: string): Boolean; stdcall;
function TGuild_LoadGuildConfig(SelfObject: TGuild; sGuildFileName: string): Boolean; stdcall;
procedure TGuild_UpdateGuildFile(SelfObject: TGuild); stdcall;
procedure TGuild_CheckSaveGuildFile(SelfObject: TGuild); stdcall;
function TGuild_IsMember(SelfObject: TGuild; sName: string): Boolean; stdcall;
function TGuild_IsAllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
function TGuild_IsWarGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
function TGuild_DelAllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
procedure TGuild_TeamFightWhoDead(SelfObject: TGuild; sName: string); stdcall;
procedure TGuild_TeamFightWhoWinPoint(SelfObject: TGuild; sName: string; nPoint: Integer); stdcall;
procedure TGuild_SendGuildMsg(SelfObject: TGuild; sMsg: string; nColor: Integer = 0; fc: Integer = -1; bc: Integer = -1; sec: Integer = 0); stdcall;
procedure TGuild_RefMemberName(SelfObject: TGuild); stdcall;
function TGuild_GetRankName(SelfObject: TGuild; PlayObject: TPlayObject; var nRankNo: Integer): string; stdcall;
function TGuild_DelMember(SelfObject: TGuild; sHumName: string): Boolean; stdcall;
function TGuild_UpdateRank(SelfObject: TGuild; sRankData: string): Integer; stdcall;
function TGuild_CancelGuld(SelfObject: TGuild; sHumName: string): Boolean; stdcall;
function TGuild_IsNotWarGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
function TGuild_AllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
function TGuild_AddMember(SelfObject: TGuild; PlayObject: TPlayObject): Boolean; stdcall;
procedure TGuild_DelHumanObj(SelfObject: TGuild; PlayObject: TPlayObject); stdcall;
function TGuild_GetChiefName(SelfObject: TGuild): string; stdcall;
procedure TGuild_BackupGuildFile(SelfObject: TGuild); stdcall;
procedure TGuild_sub_499B4C(SelfObject: TGuild; Guild: TGuild); stdcall;
function TGuild_AddWarGuild(SelfObject: TGuild; Guild: TGuild): pTWarGuild; stdcall;
procedure TGuild_StartTeamFight(SelfObject: TGuild); stdcall;
procedure TGuild_EndTeamFight(SelfObject: TGuild); stdcall;
procedure TGuild_AddTeamFightMember(SelfObject: TGuild; sHumanName: string); stdcall;


implementation

function TGuild_sGuildName(SelfObject: TGuild): _LPTSHORTSTRING; stdcall;
begin
  try
    Result := @SelfObject.sGuildName;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_sGuildName');
  end;
end;
function TGuild_NoticeList(SelfObject: TGuild): TStringList; stdcall;
begin
  try
    Result := SelfObject.NoticeList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_NoticeList');
  end;
end;
function TGuild_m_GuildWarList(SelfObject: TGuild): TCnHashTableSmall; stdcall;
begin
  try
    Result := SelfObject.m_GuildWarList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_GuildWarList');
  end;
end;
function TGuild_m_GuildAllList(SelfObject: TGuild): TCnHashTableSmall; stdcall;
begin
  try
    Result := SelfObject.m_GuildAllList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_GuildAllList');
  end;
end;
function TGuild_m_RankList(SelfObject: TGuild): TList; stdcall;
begin
  try
    Result := SelfObject.m_RankList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_RankList');
  end;
end;
function TGuild_m_nContestPoint(SelfObject: TGuild): pInteger; stdcall;
begin
  try
    Result := @SelfObject.m_nContestPoint;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_nContestPoint');
  end;
end;
function TGuild_boTeamFight(SelfObject: TGuild): pBoolean; stdcall;
begin
  try
    Result := @SelfObject.boTeamFight;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_boTeamFight');
  end;
end;
function TGuild_TeamFightDeadList(SelfObject: TGuild): TStringList; stdcall;
begin
  try
    Result := SelfObject.TeamFightDeadList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_TeamFightDeadList');
  end;
end;
function TGuild_m_boEnableAuthAlly(SelfObject: TGuild): pBoolean; stdcall;
begin
  try
    Result := @SelfObject.m_boEnableAuthAlly;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_boEnableAuthAlly');
  end;
end;
function TGuild_dwSaveTick(SelfObject: TGuild): pLongWord; stdcall;
begin
  try
    Result := @SelfObject.dwSaveTick;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_dwSaveTick');
  end;
end;
function TGuild_boChanged(SelfObject: TGuild): pBoolean; stdcall;
begin
  try
    Result := @SelfObject.boChanged;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_boChanged');
  end;
end;
function TGuild_m_DynamicVarList(SelfObject: TGuild): TList; stdcall;
begin
  try
    Result := SelfObject.m_DynamicVarList;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_DynamicVarList');
  end;
end;
function TGuild_m_Territory(SelfObject: TGuild): TObject; stdcall;
begin
  try
    Result := SelfObject.m_Territory;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_m_Territory');
  end;
end;

//functions

procedure TGuild_SaveGuildInfoFile(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.SaveGuildInfoFile;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_SaveGuildInfoFile');
  end;
end;
function TGuild_LoadGuild(SelfObject: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.LoadGuild;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_LoadGuild');
  end;
end;
function TGuild_LoadGuildFile(SelfObject: TGuild; sGuildFileName: string): Boolean; stdcall;
begin
  try
    Result := SelfObject.LoadGuildFile(sGuildFileName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_LoadGuildFile');
  end;
end;
function TGuild_LoadGuildConfig(SelfObject: TGuild; sGuildFileName: string): Boolean; stdcall;
begin
  try
    Result := SelfObject.LoadGuildConfig(sGuildFileName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_LoadGuildConfig');
  end;
end;
procedure TGuild_UpdateGuildFile(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.UpdateGuildFile;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_UpdateGuildFile');
  end;
end;
procedure TGuild_CheckSaveGuildFile(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.CheckSaveGuildFile;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_CheckSaveGuildFile');
  end;
end;
function TGuild_IsMember(SelfObject: TGuild; sName: string): Boolean; stdcall;
begin
  try
    Result := SelfObject.IsMember(sName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_IsMember');
  end;
end;
function TGuild_IsAllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.IsAllyGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_IsAllyGuild');
  end;
end;
function TGuild_IsWarGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.IsWarGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_IsWarGuild');
  end;
end;
function TGuild_DelAllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.DelAllyGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_DelAllyGuild');
  end;
end;
procedure TGuild_TeamFightWhoDead(SelfObject: TGuild; sName: string); stdcall;
begin
  try
    SelfObject.TeamFightWhoDead(sName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_TeamFightWhoDead');
  end;
end;
procedure TGuild_TeamFightWhoWinPoint(SelfObject: TGuild; sName: string; nPoint: Integer); stdcall;
begin
  try
    SelfObject.TeamFightWhoWinPoint(sName, nPoint);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_TeamFightWhoWinPoint');
  end;
end;
procedure TGuild_SendGuildMsg(SelfObject: TGuild; sMsg: string; nColor: Integer = 0; fc: Integer = -1; bc: Integer = -1; sec: Integer = 0); stdcall;
begin
  try
    SelfObject.SendGuildMsg(sMsg, nColor, fc, bc, sec);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_SendGuildMsg');
  end;
end;
procedure TGuild_RefMemberName(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.RefMemberName;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_RefMemberName');
  end;
end;
function TGuild_GetRankName(SelfObject: TGuild; PlayObject: TPlayObject; var nRankNo: Integer): string; stdcall;
begin
  try
    Result := SelfObject.GetRankName(PlayObject, nRankNo);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_GetRankName');
  end;
end;
function TGuild_DelMember(SelfObject: TGuild; sHumName: string): Boolean; stdcall;
begin
  try
    Result := SelfObject.DelMember(sHumName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_DelMember');
  end;
end;
function TGuild_UpdateRank(SelfObject: TGuild; sRankData: string): Integer; stdcall;
begin
  try
    Result := SelfObject.UpdateRank(sRankData);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_UpdateRank');
  end;
end;
function TGuild_CancelGuld(SelfObject: TGuild; sHumName: string): Boolean; stdcall;
begin
  try
    Result := SelfObject.CancelGuld(sHumName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_CancelGuld');
  end;
end;
function TGuild_IsNotWarGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.IsNotWarGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_IsNotWarGuild');
  end;
end;
function TGuild_AllyGuild(SelfObject: TGuild; Guild: TGuild): Boolean; stdcall;
begin
  try
    Result := SelfObject.AllyGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_AllyGuild');
  end;
end;
function TGuild_AddMember(SelfObject: TGuild; PlayObject: TPlayObject): Boolean; stdcall;
begin
  try
    Result := SelfObject.AddMember(PlayObject);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_AddMember');
  end;
end;
procedure TGuild_DelHumanObj(SelfObject: TGuild; PlayObject: TPlayObject); stdcall;
begin
  try
    SelfObject.DelHumanObj(PlayObject);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_DelHumanObj');
  end;
end;
function TGuild_GetChiefName(SelfObject: TGuild): string; stdcall;
begin
  try
    Result := SelfObject.GetChiefName;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_GetChiefName');
  end;
end;
procedure TGuild_BackupGuildFile(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.BackupGuildFile;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_BackupGuildFile');
  end;
end;
procedure TGuild_sub_499B4C(SelfObject: TGuild; Guild: TGuild); stdcall;
begin
  try
    SelfObject.sub_499B4C(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_sub_499B4C');
  end;
end;
function TGuild_AddWarGuild(SelfObject: TGuild; Guild: TGuild): pTWarGuild; stdcall;
begin
  try
    Result := SelfObject.AddWarGuild(Guild);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_AddWarGuild');
  end;
end;
procedure TGuild_StartTeamFight(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.StartTeamFight;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_StartTeamFight');
  end;
end;
procedure TGuild_EndTeamFight(SelfObject: TGuild); stdcall;
begin
  try
    SelfObject.EndTeamFight;
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_EndTeamFight');
  end;
end;
procedure TGuild_AddTeamFightMember(SelfObject: TGuild; sHumanName: string); stdcall;
begin
  try
    SelfObject.AddTeamFightMember(sHumanName);
  except
    MainOutMessageAPI('[Exception] TGuildApi.TGuild_AddTeamFightMember');
  end;
end;



end.
